#include "Int_motor.h"
//初始化电机

void Int_Motor_Init(void){
    HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
    HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);
    HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_3);
    HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_4);
}
//电机控制
void Int_Motor_Setspeed(Motor_struct *motor){

    __HAL_TIM_SET_COMPARE(motor->htim, motor->channel, motor->speed);
}
